<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="msearch.model.Mp3Object"%>
<%@page import="java.util.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Search Result</title>
</head>
<body>
<h2>Search Result</h2>
<%List<Mp3Object> result=(List)session.getAttribute("result");%>
<%if(result.size()==0) {%>
Sorry, there aren't matched mp3 files.
<% }else{%>
<ul>
<% for(int i=0;i<result.size();i++){ %>
<br/>
<embed src="media/<%= result.get(i).getFilePath().substring(result.get(i).getFilePath().lastIndexOf("\\")+1) %>" loop=false autostart=false width="460" height="68"><br/>
<li><%= result.get(i).getArtist() %></li>
<%}} %>
</ul>
</body>
</html>